home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
Audio dcmds
/
Audio CD dcmds.sit
/
Audio CD dcmds.π
/
Read me first !
< prev
next >
Wrap
Text File
|
1994-08-31
|
5KB
|
118 lines
************************
* Think C dcmd 1.0.1 *
************************
Written by P. Stadelmann, August 1994.
•• Introduction ••
This package allows you to write dcmds in Think C. It contains the glue code
necessary to link the "dcmd.o" library, and Think Put, a collection of routines
to create formatted output in dcmds.
IMPORTANT : There is no change in the interface between version 1.0 and 1.0.1
Thus, there is no need to modifiy your code.
•• How to use (Think C 7.0 or later) ••
The following applies to Think C 7.0 or later. If you use an earlier version
of Think C, please refer to "How to use (Think C 6.0.x or earlier)"
1) Put the files "Think_dcmd.h", "Think_put.h", "Think dcmd glue" and "Think Put Lib"
where the Project Manager can find them (like in the "Mac Librairies" and
"Mac #includes" folders).
2) Do the same with the files "dcmd.h" and "dcmdGlue.a.o". These files are available
along with MacsBug from ftp.apple.com in the dts/mac/tools/macsbug/ directory.
3) Drop the folder named "Think dcmd" into the (Project Models) folder.
4) In the Project Manager, create a new project. Choose "Think dcmd" in project list.
Add your code in the dcmd.c file : write the CommandEntry code as described in
chapter 8 of the book "MacsBug Reference and Debugging Reference" from
Apple Computer, Inc.
5) Use the "Set Project Type" command to choose the name and id of your dcmd. Remember
that the dcmd name (used to run the dcmd in MacsBug) is the name of the dcmd resource.
6) Once you have built the dcmd, use a resource editor to copy the dcmd into the
"Debugger Prefs" file inside your system folder.
•• How to use (Think C 6.0.x or earlier) ••
1) Delete the "Think dcmd glue" and "Think Put Lib" project files, because they can
only be used with Think C 7.0 or later.
2) Create an empty project named "Think dcmd glue". Add the file "Think dcmd glue.c"
from the "Think dcmd glue source" folder to the project. Set the project type to
"Code resource". Bring the project up to date.
3) Create an empty project named "Think Put Lib". Add all the files from the
"Think Put Lib source" folder to the project. Set the project type to
"Code resource". Bring the project up to date.
4) Put the files "Think_dcmd.h", "Think_put.h", "Think dcmd glue" and "Think Put Lib"
where the Project Manager can find them (like in the "Mac Librairies" and
"Mac #includes" folders).
5) Do the same with the files "dcmd.h" and "dcmdGlue.a.o". These files are available
along with MacsBug from ftp.apple.com in the dts/mac/tools/macsbug/ directory.
If you have Think C 5.0.x or earlier, convert the "dcmdGlue.a.o" library into
an A4-based project with the "oConv" application.
6) Create a new project. Add the "dcmdGlue.a.o" library (or the corresponding
converted project file), the "Think dcmd glue" file and a copy of the "dcmd.c" file
to your project. Add your code in the dcmd.c file : write the CommandEntry code as
described in chapter 8 of the book "MacsBug Reference and Debugging Reference"
from Apple Computer, Inc.
7) Using the "Set Project Type" command, set the project type to "Code resource", the
type to 'dcmd'. Choose the name and id of your dcmd. Remember that the dcmd name
(used to run the dcmd in MacsBug) is the name of the dcmd resource. Set the file
type to 'rsrc' and the creator to 'RSED'.
VERY IMPORTANT : Check the "Custom header" checkbox.
8) Once you have built the dcmd, use a resource editor to copy the dcmd into the
"Debugger Prefs" file inside your system folder.
•• Notes ••
◊ In Think C 7.0 or later, execute step 1-3 only once. For each new dcmd you want
to write, start at step 4.
◊ In Think C 6.0.x or earlier, execute step 1-5 only once. For each new dcmd you want
to write, start at step 6.
◊ If you want to use global variables, #include <SetUpA4.h> in the begining of the
dcmd.c file. Call RememmberA0() and SetUpA4() in the begining of the CommandEntry
procedure, and RestoreA4() in the end.
◊ To use the Think Put Library, add the "Think Put Lib" file to your project and
#include <Think_put.h> in the beginning of the dcmd.c file
◊ The Think Put Library in this package requires globals.
•• Changes since version 1.0 ••
◊ Now compatible with "TestDcmd". "Break on entry" didn't work with version 1.0
◊ The "@1.π" project now has the "Use MacsBug name" flag set under "Debugging"
◊ Renamed global variables.
◊ Some fixes in the doc.
•• About ••
Written by P. Stadelmann <Patrick.Stadelmann@etudiants.unine.ch>.
Feel free to contact me if you have comments, suggestions or bugs to report.
Thanks to R. Wesley.
This package is public domain. However, the "dcmd.h" and "dcmdGlue.a.o"
files are copyrighted material from Apple Computer, Inc.